package com.yupi.yoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.yupi.yoj.model.dto.contest.ContestQueryTeamListByTidsRequest;
import com.yupi.yoj.model.dto.question.QuestionQueryRequest;
import com.yupi.yoj.model.entity.Question;
import com.yupi.yoj.model.vo.PostVO;
import com.yupi.yoj.model.vo.QuestionVO;
import com.yupi.yoj.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 46411
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2024-09-23 23:35:18
*/
public interface QuestionService extends IService<Question> {


    void addQuestion(Question question);

    void updateQuestionById(Question question);

    void deleteQuestionById(Long id);

    QuestionVO getQuestionById(Long id);

    QueryWrapper<Question> getQueryWrapper(QuestionQueryRequest questionQueryRequest);

    List<QuestionVO> getQuestionVO(List<Question> record);
    QuestionVO getQuestionVO(Question record);
    List<QuestionVO> listQuestionByTagTitle(String title, String tag);

    List<Question> getQuestionListByTids(ContestQueryTeamListByTidsRequest contestQueryRequest);

    public Page<Question> searchFromEs(QuestionQueryRequest questionQueryRequest);

    Page<QuestionVO> getQuestionVOPage(Page<Question> postPage, HttpServletRequest request);
}
